06. String Concatenation
string concatenation
String concatenation
Strings are a collection of characters enclosed inside double or single quotes. You can use strings to represent data like sentences, names, addresses, and more. Did you know you can even add strings together? In JavaScript, this is called concatenating. Concatenating two strings together is actually pretty simple!
"Hello," + " New York City"
Returns: "Hello, New York City"
You will see other ways to concatenate and do even more with strings later in this course. But for now, practice using the addition +
operator.
What is the output?
SOLUTION:
"helloworld"What is the output?
SOLUTION:
"Hello + 5*10"What is the output?